import Vue from 'vue';
import Vuex from 'vuex';
import VuexAlong from 'vuex-along';
Vue.use(Vuex);

export default new Vuex.Store({
    state:{
        userInfo:null
    },
    mutations:{
        login(state,user){
            //console.log(user)
            state.userInfo=user;
        },
        logout(state){
            state.userInfo=null
        }
    },
    actions:{
        /*
        setUserInfo({commit},user){
            commit('login',user);
        }*/
    },
    plugins:[VuexAlong()]
})